//
//  LoginViewController.m
//  A段项目,漫画
//
//  Created by dlios on 15-4-23.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "LoginViewController.h"
#define WIDTH self.view.frame.size.width
#define HEIGHT self.view.frame.size.height
@interface LoginViewController ()

@end

@implementation LoginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"用户登录";
    
    [self creatView];
    
    
}

#pragma mark 设置界面
-(void)creatView
{
//    self.nameText = [[UITextField alloc]initWithFrame:CGRectMake(100, 100, WIDTH - 200, 50)];
//    self.nameText.layer.borderWidth = 1;
//    self.nameText.layer.cornerRadius = 5;
//    
//    self.nameText.placeholder = @"请输入用户名";
//    self.nameText.textAlignment = NSTextAlignmentCenter;
//    self.nameText.clearButtonMode = UITextFieldViewModeAlways;
//    self.nameText.keyboardType = UIKeyboardTypeDefault;
//    [self.view addSubview:self.nameText];
//    [_nameText release];
//    
//    
//    self.passWordText = [[UITextField alloc]initWithFrame:CGRectMake(100, 170, WIDTH - 200, 50)];
//    self.passWordText.layer.borderWidth = 1;
//    self.passWordText.layer.cornerRadius = 5;
//    
//    self.passWordText.placeholder = @"请输入密码";
//    self.passWordText.textAlignment = NSTextAlignmentCenter;
//    self.passWordText.clearButtonMode = UITextFieldViewModeAlways;
//    self.passWordText.keyboardType = UIKeyboardTypeDefault;
//    [self.view addSubview:self.passWordText];
//    [_passWordText release];
//    
//    
//    self.loginButton = [UIButton buttonWithType:UIButtonTypeSystem];
//    self.loginButton.frame = CGRectMake(100, 240, WIDTH - 200, 50);
//    [self.view addSubview:self.loginButton];
//    self.loginButton.layer.borderWidth = 1;
//    self.loginButton.layer.cornerRadius = 5;
//    self.loginButton.tintColor = [UIColor orangeColor];
//    self.loginButton.backgroundColor = [UIColor cyanColor];
//    [self.loginButton setTitle:@"登录" forState:UIControlStateNormal];
//    [self.loginButton addTarget:self action:@selector(clickToPersonal:) forControlEvents:UIControlEventTouchUpInside];
    
    
    self.qqloginbutton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.qqloginbutton.frame = CGRectMake(100, 300,WIDTH - 200 , 50);
    [self.qqloginbutton setTitle:@"QQ账号登陆" forState:UIControlStateNormal];
    [self.qqloginbutton addTarget:self action:@selector(clickToqqVie:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.qqloginbutton];
    self.qqloginbutton.layer.borderWidth = 1;
    self.qqloginbutton.layer.cornerRadius = 5;
    
    
    self.weibologinbutton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.weibologinbutton.frame = CGRectMake(100, 360,WIDTH - 200 , 50);
    [self.weibologinbutton setTitle:@"微博登录" forState:UIControlStateNormal];
    [self.weibologinbutton addTarget:self action:@selector(clickToweiboVie:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.weibologinbutton];
    self.weibologinbutton.layer.borderWidth = 1;
    self.weibologinbutton.layer.cornerRadius = 5;
    
    
//    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"注册" style:UIBarButtonItemStylePlain target:self action:@selector(clickToRegisterView:)];
    
    
    
    
}

//Button点击方法
//-(void)clickToPersonal:(UIButton *)sender
//{
//    //点击登录到个人中心
//    NSLog(@"登录到各人中心");
//    PersonalCentreViewController *pcvc = [[PersonalCentreViewController alloc]init];
//    [self.navigationController pushViewController:pcvc animated:YES];
//    [pcvc release];
//}

-(void)clickToqqVie:(UIButton *)sender
{
    NSLog(@"使用QQ登录");
    
}

-(void)clickToweiboVie:(UIButton *)sender
{
    NSLog(@"使用微博登陆");
}

//-(void)clickToRegisterView:(UIBarButtonItem *)bar
//{
//    registerViewController *rvc = [[registerViewController alloc]init];
//    [self.navigationController pushViewController:rvc animated:YES];
//    [rvc release];
//}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
